package com.tmall.controller.portal;

import java.util.Scanner;

/**
 * Created by Quincy on 2017/7/7.
 */
public class test {
    public static void main(String[] args){
//        int i = 4;
//        double d = 4.0;
//        String s = "HackerRank ";
//
//        Scanner scan = new Scanner(System.in);
//              /* Declare second integer, double, and String variables. */
//        int str1 = scan.nextInt();
//        double str2 = scan.nextDouble();
//        String str3 = scan.nextLine();
//        /* Read and save an integer, double, and String to your variables.*/
//        // Note: If you have trouble reading the entire String, please go back and review the Tutorial closely.
//        int out1 = str1 + i;
//        double out2 = str2 + d;
//        StringBuffer out3 = new StringBuffer(s);
//        out3.append(String.valueOf(str3));
//        /* Print the sum of both integer variables on a new line. */
//        System.out.println(out1);
//        /* Print the sum of the double variables on a new line. */
//        System.out.println(out2);
//        /* Concatenate and print the String variables on a new line;
//        	the 's' variable above should be printed first. */
//        System.out.print(out3);
//
//        scan.close();
        Scanner scan = new Scanner(System.in);
        double mealCost = scan.nextDouble(); // original meal price
        int tipPercent = scan.nextInt(); // tip percentage
        int taxPercent = scan.nextInt(); // tax percentage
        scan.close();

        // Write your calculation code here.
        double tip = mealCost*((double)tipPercent/100.00);
        double tax = mealCost * ((double)taxPercent/100.00);
        double numberToRoundHere= mealCost + tip + tax;
        // cast the result of the rounding operation to an int and save it as totalCost
        int totalCost = (int) Math.round(numberToRoundHere);

        // Print your result
        System.out.println("The total meal cost is "+totalCost + " dollars");
    }
}
